<div class="layui-fluid">
    <div class="layui-form" lay-filter="layadmin-myinvoice-typeinform">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label"><span style="color:red;">*</span>票据类型</label>
                <div class="layui-input-block">
                    <select name="billType" lay-filter="myinvoice-typeinform-select-filter">
                        <option value="">请选择票据类型</option>
                        <option value="1">电子发票（普通发票）</option>
                        <option value="2">电子发票（增值税专用发票）</option>
                        <option value="3">电子发票（航空运输电子客票行程单）</option>
                        <option value="5">增值税电子普通发票</option>
                        <option value="6">增值税电子专用发票</option>
                    </select>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    layui.use(['admin', 'table', 'form', 'util'], function () {
        var $ = layui.$
            , admin = layui.admin
            , setter = layui.setter
            , view = layui.view
            , table = layui.table
            , laydate = layui.laydate
            , util = layui.util
            , form = layui.form;

        //form.render(null, 'layadmin-myinvoice-typeinform');

        //处理自定义事件
        util.on({
            clear: function () {
                console.log(this); // 当前触发事件的 DOM 元素

                $(':input[name=lotNo]').val('');
                $(':input[name=uploadTimeStart]').val('');
                $(':input[name=uploadTimeEnd]').val('');
                //form.render($('#ID-select-myinvoice-billtype'));

                //执行重载
                table.reload('LAY-myinvoice-viewresult-manage', {
                    where: {}
                });
            }
        });

        // 日期范围 - 左右面板联动选择模式
        laydate.render({
            elem: '#ID-laydate-rangeLinked',
            range: ['#ID-laydate-start-date-myinvoice-view', '#ID-laydate-end-date-myinvoice-view'],
            rangeLinked: true,
            type: 'datetime',
            fullPanel: true
        });

        //开启搜索
        form.on('submit(LAY-myinvoice-viewresult-search)', function (data) {
            var field = data.field;

            //执行重载
            table.reload('LAY-myinvoice-viewresult-manage', {
                where: field
            });
        });
    });
</script>